//
//  BookingDeleteCell.m
//  whopaidforit
//
//  Created by Hoang Vu on 2/5/13.
//  Copyright (c) 2013 Hoang Vu. All rights reserved.
//

#import "BookingDeleteCell.h"

@implementation BookingDeleteCell

@synthesize picture, lblName, lblDate, lblPrice, lblQuantity;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    UIView *view = [[UIView alloc] init];
    view.frame = CGRectMake(50, 0, 260, 58);
    [StyleControl setViewStyle:view];
    
    picture = [[UIImageView alloc] initWithFrame:CGRectMake(60, 5, 45, 45)];
    UIImage *image = [UIImage imageNamed:@"member"];
    picture.image = image;
    [StyleControl setBorderStyle:picture];
    [self.contentView addSubview:picture];
    
    lblName = [[UILabel alloc] initWithFrame:CGRectMake(110, 2, 100, 21)];
    lblName.backgroundColor = [UIColor clearColor];
    [lblName setTextColor:[UIColor colorWithRed:0.247 green:0.243 blue:0.243 alpha:1.0]];
    lblName.text = @"Profielfoto";
    lblName.font = [UIFont systemFontOfSize:13];
    lblName.layer.shadowOpacity = 0;
    [self.contentView addSubview:lblName];
    
    lblDate = [[UILabel alloc] initWithFrame:CGRectMake(110, 20, 100, 21)];
    lblDate.backgroundColor = [UIColor clearColor];
    [lblDate setTextColor:[UIColor colorWithRed:0.247 green:0.243 blue:0.243 alpha:1.0]];
    lblDate.text = @"07-02-2013";
    [StyleControl setDateStyle:lblDate];
    [self.contentView addSubview:lblDate];
    
    lblPrice = [[UILabel alloc] initWithFrame:CGRectMake(110, 34, 100, 21)];
    lblPrice.backgroundColor = [UIColor clearColor];
    [lblPrice setTextColor:[UIColor colorWithRed:0.247 green:0.243 blue:0.243 alpha:1.0]];
    lblPrice.text = @"$ 123,34";
    [StyleControl setPriceStyle:lblPrice];
    [self.contentView addSubview:lblPrice];
    
    UIImageView *icon = [[UIImageView alloc] initWithFrame:CGRectMake(280, 10, 30, 30)];
    UIImage *iconimage = [UIImage imageNamed:@"userIcon"];
    icon.image = iconimage;
    [self.contentView addSubview:icon];
    [icon release];
    
    lblQuantity = [[UILabel alloc] initWithFrame:CGRectMake(290, 35, 100, 21)];
    lblQuantity.backgroundColor = [UIColor clearColor];
    [lblQuantity setTextColor:[UIColor colorWithRed:0.247 green:0.243 blue:0.243 alpha:1.0]];
    lblQuantity.text = @"3x";
    [StyleControl setDateStyle:lblQuantity];
    [self.contentView addSubview:lblQuantity];
    [lblQuantity release];
    
    [self.contentView addSubview:view];
    [view release];
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
-(void) dealloc
{
    [super dealloc];
    [picture release];
    [lblDate release];
    [lblName release];
    [lblPrice release];
    //[lblQuantity release];
}
@end
